<template>
  <div id="app">
    <Header v-if="!navList"></Header>
    <NavList v-if="!navList"></NavList>
    <router-view class="router"></router-view>
    <Footer v-if="!navList"></Footer>
  </div>
</template>

<script>
    import Header from './components/Public/Header';
    import Footer from './components/Public/Footer';
    import NavList from './components/Public/NavList';
    export default {
        name: 'App',
        data() {
            return {
                navList: false
            }
        },
        components: {
            Header,
            Footer,
            NavList,
        },
        created() {
            this.fetchdata()
        },
        watch: {
            "$route.query": 'fetchdata'
        },
        methods: {
            fetchdata() {
                this.navList = false
                if (this.$route.query.show == 'true') {
                    this.navList = this.$route.query
                }
            }
        },
        mounted: function() {

        },
    }
</script>

<style>
    html,
    body {
        min-width: 100vw;
        min-height: 100vh;
    }
    
    .router {
        /* min-height: 550px; */
    }
    /*安全距离*/
    
    .container {
        width: 1200px;
        margin-left: auto;
        margin-right: auto;
        line-height: 1;
    }
    /*页面导航下边的border*/
    
    .nav_border {
        border-top: 2px solid rgba(18, 141, 255, 1);
    }
    /*医院级别小标签*/
    
    .hospital_level {
        display: block;
        width: 36px;
        height: 18px;
        background: rgba(231, 243, 255, 1);
        border: 1px solid rgba(18, 141, 255, 1);
        border-radius: 4px;
        color: rgba(18, 141, 255, 1);
        text-align: center;
        line-height: 18px;
    }
</style>